Method for achieving non-selfie-taking effect through selfie-taking and photographing device

ABSTRACT

A method for achieving a non-selfie-taking effect through selfie-taking includes displaying indication information on a photographing device. The indication information is used to indicate a placement position and a placement angle of the photographing device. The method includes performing photographing according to the indication information to obtain at least two images. The method includes removing arm part images that are separately included in the at least two images and that are photographed by a user by using the photographing device to obtain at least two remaining images. The method includes stitching the at least two remaining images.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a national stage of International Application No.PCT/CN2016/102394, filed on Oct. 18, 2016, which is hereby incorporatedby reference in its entirety.

TECHNICAL FIELD

Embodiments of the present invention relate to the field of imageprocessing, and in particular, to a method for achieving anon-selfie-taking effect through selfie-taking and a photographingdevice.

BACKGROUND

Traveling has become an important part of people's modern life, andphotographing is even more essential during traveling. Selfie-taking hascurrently become increasingly common. In particular, using a selfiestick can achieve a quite good selfie-taking effect. However, duringselfie-taking, a person who performs photographing with the selfie stickhas only one hand free to pose, and a part of an arm or the selfie stickmay be photographed. Therefore, a non-selfie-taking effect cannot beachieved.

An image stitching technology may be used to stitch at least twoselfies, so as to achieve a non-selfie-taking effect. The imagestitching technology may include an area-based stitching algorithm and afeature-based stitching algorithm. The area-based stitching algorithm isthe most conventional and commonest algorithm. The method is performedstarting from grayscale values of to-be-stitched images. A differencebetween grayscale values of an area in a to-be-registered image and anarea of a same size in a reference image is calculated by using a leastsquare method or another mathematical method. After the difference iscompared, an overlapping area similarity of the to-be-stitched images isdetermined to obtain a range and a position of an overlapping area ofthe to-be-stitched images, thereby implementing image stitching.Alternatively, an image may be transformed from time domain to frequencydomain through FFT, and then registered. For an image with relativelylarge displacement, the image may be first rotated, and then a mappingrelationship between two images is established. When a differencebetween grayscale values of pixels in two areas is used as a determiningcriterion, a simplest method is directly summing grayscale differencesof all pixels. In this method, an effect is not quite good, andstitching often fails due to a brightness change, a contrast change, oranother reason.

Another method is calculating a correlation coefficient of grayscalevalues of corresponding pixels in two areas. A larger correlationcoefficient indicates a higher matching degree of two images. Thismethod has a better stitching effect and a higher success rate.

In the feature-based registration method, a feature of an image isderived from a pixel instead of directly using a pixel value of theimage, and then searching and matching are performed on a correspondingfeature area of an overlapping area of the image by using the feature ofthe image as a criterion. This stitching algorithm has relatively highrobustness.

The feature-based registration method has two processes: featureextraction and feature registration. Features such as a point, a line,and an area with an obvious grayscale change are first extracted fromtwo images to form a feature set. Then every effort is made to select,by using a feature matching algorithm, a feature pair with acorrespondence from the feature set corresponding to the two images. Aseries of image segmentation technologies, such as a Canny operator, aLaplace Gaussian operator, and region growing, are used for featureextraction and boundary detection. An extracted spatial feature includesa closed boundary, an open boundary, a cross line, and another feature.There are the following feature matching algorithms: cross correlation,distance transformation, dynamic programming, structure matching, chaincode correlation, and the like.

In the foregoing two algorithms, the area-based matching method oftenhas a decreased success rate due to a brightness change or a contrastchange, and the feature-based matching algorithm has a better effect,but the algorithm is complex and time-consuming. In other words, theexisting image stitching algorithms are more or less limited, whichmakes image registration difficult. Consequently, an image stitchingeffect may be unsatisfactory, and a problem such as an image stitchingtrace can be found.

SUMMARY

Embodiments of the present invention provide a method for achieving anon-selfie-taking effect through selfie-taking and an apparatus.

According to a first aspect, the present invention provides a method forachieving a non-selfie-taking effect through selfie-taking, where themethod includes:

displaying indication information on a photographing device, where theindication information is used to indicate a placement position and aplacement angle of the photographing device; performing photographingaccording to the indication information to obtain at least two images;removing arm part images that are separately included in the at leasttwo images and that are photographed by a user by using thephotographing device, to obtain at least two remaining images; andstitching the at least two remaining images.

During photographing, the user may determine the position and the angleof the photographing device based on the specific indicationinformation, and then perform photographing to obtain the at least twoimages. Then the arm parts in which the user holds the photographingdevice during photographing are removed, and the remaining images arestitched. In this way, the non-selfie-taking effect can be achieved.

With reference to the first aspect, in a first possible implementationof the first aspect, the indication information includes firstindication information and second indication information. That, theindication information is used to indicate a placement position and aplacement angle of the photographing device may specifically include:the first indication information indicates the placement position of thephotographing device, and the second indication information indicatesthe placement angle of the photographing device. The placement positionof the photographing device includes one or a combination of thefollowing positions: a position aligned with a face of a photographedperson, a position aligned with a middle of a forehead of thephotographed person, and a position aligned with a nose of thephotographed person. The photographing position and the photographingangle are determined, so that the user can photograph different imagesfrom a same position and a same angle, and then stitching is performed.The same position and the same angle are used, so that an amount ofimage stitching computation can be reduced. In addition, an imagestitching effect can be quite good.

With reference to the first possible implementation of the first aspect,in a second possible implementation of the first aspect, the firstindication information is a line segment or a graphic.

The first indication information is set to the line segment or thegraphic, so that the user can more accurately determine the placementposition of the photographing device when photographing is performed fora plurality of times.

With reference to the first possible implementation of the first aspector the second possible implementation of the first aspect, in a thirdpossible implementation of the first aspect, that the first indicationinformation indicates the placement position of the photographing devicespecifically includes:

determining the placement position of the photographing device when thefirst indication information is aligned with a specified position of thephotographed person.

With reference to the first possible implementation of the first aspect,in a fourth possible implementation of the first aspect, that the secondindication information indicates the placement angle of thephotographing device specifically includes:

determining, according to a first measurement criterion, that placementangles of the photographing device are the same when the photographingdevice photographs the at least two images.

When the user performs selfie-taking for a plurality of times, thephotographing device performs photographing from a same angle, so thatan operation count for subsequent image stitching can also be reduced,and an image stitching effect can be better.

According to a second aspect, an embodiment of the present inventionprovides a photographing device, where the photographing deviceincludes:

a display module, configured to display indication information, wherethe indication information is used to indicate a placement position anda placement angle of the photographing device; a photographing module,configured to perform photographing according to the indicationinformation to obtain at least two images; and a processing module,configured to: remove arm part images that are separately included inthe at least two images and that are photographed by the photographingmodule, to obtain at least two remaining images; and stitch the at leasttwo remaining images.

When performing photographing by using the photographing device, a userdetermines the position and the angle of the photographing deviceaccording to the indication information displayed by the display module,and then performs photographing by using the photographing module. Afterthe at least two images are obtained, the processing module removes thearm parts in which the user holds the photographing device duringphotographing, and stitches the remaining images. In this way, anon-selfie-taking effect can be achieved.

With reference to the second aspect, in a first possible implementationof the second aspect, the indication information includes firstindication information and second indication information. That theindication information is used to indicate a placement position and aplacement angle of the photographing device may specifically include:the first indication information indicates the placement position of thephotographing device, and the second indication information indicatesthe placement angle of the photographing device. The placement positionof the photographing device includes one or a combination of thefollowing positions: a position aligned with a face of a photographedperson, a position aligned with a middle of a forehead of thephotographed person, and a position aligned with a nose of thephotographed person. The photographing position and the photographingangle are determined, so that the user can photograph different imagesfrom a same position and a same angle, and then stitching is performed.The same position and the same angle are used, so that an amount ofimage stitching computation can be reduced. In addition, an imagestitching effect can be quite good.

With reference to the first possible implementation of the secondaspect, in a second possible implementation of the second aspect, thefirst indication information is a line segment or a graphic.

The first indication information is set to the line segment or thegraphic, so that the user can more accurately determine the placementposition of the photographing device when photographing is performed fora plurality of times.

With reference to the first possible implementation of the second aspector the second possible implementation of the second aspect, in a thirdpossible implementation of the second aspect, that the first indicationinformation indicates the placement position of the photographing devicespecifically includes:

determining the placement position of the photographing device when thefirst indication information is aligned with a specified position of thephotographed person.

With reference to the first possible implementation of the secondaspect, in a fourth possible implementation of the second aspect, thatthe second indication information indicates the placement angle of thephotographing device specifically includes:

determining, according to a first measurement criterion, that placementangles of the photographing device are the same when the photographingdevice photographs the at least two images.

When the user performs selfie-taking for a plurality of times, thephotographing device performs photographing from a same angle, so thatan operation count for subsequent image stitching can also be reduced,and an image stitching effect can be better.

According to a third aspect, an embodiment of the present inventionprovides a photographing device, where the photographing deviceincludes:

a display, configured to display indication information, where theindication information is used to indicate a placement position and aplacement angle of the photographing device; a camera module, configuredto perform photographing according to the indication information toobtain at least two images; and a processor, configured to: remove armpart images that are separately included in the at least two images andthat are photographed by the camera module, to obtain at least tworemaining images; and stitch the at least two remaining images.

When performing photographing by using the photographing device, a userdetermines the position and the angle of the photographing deviceaccording to the indication information displayed by the display, andthen performs photographing by using the camera module. After the atleast two images are obtained, the processor removes the arm parts inwhich the user holds the photographing device during photographing, andstitches the remaining images. In this way, a non-selfie-taking effectcan be achieved. With reference to the third aspect, in a first possibleimplementation of the third aspect, the indication information includesfirst indication information and second indication information. That theindication information is used to indicate a placement position and aplacement angle of the photographing device may specifically include:the first indication information indicates the placement position of thephotographing device, and the second indication information indicatesthe placement angle of the photographing device. The placement positionof the photographing device includes one or a combination of thefollowing positions: a position aligned with a face of a photographedperson, a position aligned with a middle of a forehead of thephotographed person, and a position aligned with a nose of thephotographed person.

The photographing position and the photographing angle are determined,so that the user can photograph different images from a same positionand a same angle, and then stitching is performed. The same position andthe same angle are used, so that an amount of image stitchingcomputation can be reduced. In addition, an image stitching effect canbe quite good.

With reference to the first possible implementation of the third aspect,in a second possible implementation of the third aspect, the firstindication information is a line segment or a graphic.

The first indication information is set to the line segment or thegraphic, so that the user can more accurately determine the placementposition of the photographing device when photographing is performed fora plurality of times.

With reference to the first possible implementation of the third aspector the second possible implementation of the third aspect, in a thirdpossible implementation of the third aspect, that the first indicationinformation indicates the placement position of the photographing devicespecifically includes:

determining the placement position of the photographing device when thefirst indication information is aligned with a specified position of thephotographed person.

With reference to the first possible implementation of the third aspect,in a fourth possible implementation of the third aspect, that the secondindication information indicates the placement angle of thephotographing device specifically includes:

determining, according to a first measurement criterion, that placementangles of the photographing device are the same when the photographingdevice photographs the at least two images.

When the user performs selfie-taking for a plurality of times, thephotographing device performs photographing from a same angle, so thatan operation count for subsequent image stitching can also be reduced,and an image stitching effect can be better.

Based on the foregoing technical solutions, according to the method forachieving a non-selfie-taking effect through selfie-taking provided inthe embodiments of the present invention, the user can separately takeat least two selfies by using two hands. During photographing, theplacement position and the placement angle of the photographing deviceare first determined according to the indication information. Thenselfie-taking is separately performed by using the two hands to obtainthe at least two images, and image stitching is performed. During imagestitching, placement positions and placement angles of a camera arebasically the same whenever photographing is performed. Therefore,during obtaining of registration control points, correspondingcoordinate positions of the registration control points are basicallythe same. In this way, an amount of image stitching computation isreduced, image stitching is easier to implement, and an image stitchingeffect is better.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic flowchart of a method for achieving anon-selfie-taking effect through selfie-taking according to Embodiment 1of the present invention;

FIG. 2 is a schematic diagram of indicating a placement position of aphotographing device by using first indication information according toan embodiment of the present invention;

FIG. 3 is a schematic diagram of indicating a placement angle of aphotographing device by using second indication information according toan embodiment of the present invention;

FIG. 4 is a schematic structural diagram of a photographing deviceaccording to Embodiment 2 of the present invention; and

FIG. 5 is a schematic structural diagram of a photographing deviceaccording to Embodiment 3 of the present invention.

DESCRIPTION OF EMBODIMENTS

The following further describes the technical solutions of the presentinvention in detail with reference to the accompanying drawings and theembodiments.

To make the objectives, technical solutions, and advantages of theembodiments of the present invention clearer, the following clearly andcompletely describes the technical solutions in the embodiments of thepresent invention with reference to the accompanying drawings in theembodiments of the present invention. Apparently, the describedembodiments are some but not all of the embodiments of the presentinvention.

The embodiments of the present invention are mainly used to resolveproblems that a user can have only one hand free to pose duringselfie-taking, a selfie stick is likely to be photographed duringselfie-taking, and the like, avoid problems that an obvious stitchingtrace exists when image stitching is performed on a plurality ofselfies, and the like, and achieve a non-selfie-taking effect afterimage stitching is performed on the plurality of selfies. To achieve theforegoing objectives, the embodiments of the present invention provide amethod for achieving a non-settle-taking effect through selfie-taking.During photographing, a user is guided to use a better photographingmanner, to ensure that photographing positions and photographing anglesare basically the same whenever photographing is performed, so thatpositions of registration control points in photographed images arebasically the same. In this way, an amount of image stitchingcomputation is greatly reduced, and image stitching is easier toimplement.

A specific method flowchart is shown in FIG. 1. FIG. 1 is a schematicflowchart 100 of a method for achieving a non-selfie-taking effectthrough selfie-taking according to Embodiment 1 of the presentinvention.

S110. Display indication information on a photographing device.

Specifically, the indication information is mainly used to indicate aplacement position and a placement angle of the photographing device.

Optionally, the indication information may include first indicationinformation and second indication information. The first indicationinformation is used to indicate the placement position of thephotographing device, and the second indication information is used toindicate the placement angle of the photographing device.

When a user starts the photographing device to perform photographing,the photographing device first automatically identifies a position ofthe user, and displays the first indication information on thephotographing device. The first indication information is used toindicate the placement position of the photographing device. Forexample, the placement position of the photographing device may includeone or a combination of the following positions: a position aligned witha whole face of a photographed person, a position aligned with a middleof a forehead of the photographed person, a position aligned with a noseof the photographed person, and the like. Certainly, the placementposition of the photographing device may be another reference position,such as a position aligned with a middle of lips of the photographedperson.

When the photographing device prepares to perform photographing, thefirst indication information displayed on the photographing device maybe a simple line segment or a simple shape, and is used to instruct theuser to place the photographing device in a position. In this case, theline segment or the shape displayed on the photographing device isexactly aligned with a specific position of the user. For example, thefirst indication information may be a T-shaped line segment shown inFIG. 2 (a). A horizontal line part of the T-shaped line segment isaligned with a position of a middle of a forehead of a person, and avertical line part is aligned with a nose of the person. When theT-shaped line segment is aligned with the forehead and the nose of theperson, the placement position of the photographing device isdetermined. Alternatively, the first indication information may be anoval circle shown in FIG. 2 (b). During photographing, when a whole faceof a person falls within the oval circle, it indicates that theplacement position of the photographing device is determined.

If displaying the first indication information means adjusting theposition of the photographing device from a macroscopic perspective,displaying the second indication information may mean adjusting theplacement angle of the photographing device from a microscopicperspective. Finally, according to the indication information, imagescan be photographed from an approximately same position and anapproximately same angle, so that subsequent image stitching processingis easier. Another reason for adjusting the placement angle of thephotographing device is as follows: If a position of a camera is placedaccording to the first indication information, but an angle of thecamera is not adjusted and photographing is performed from a randomangle when the user performs photographing with one hand, aphotographing angle can hardly be the same as that for the first time ofphotographing even though the position of the camera can be determinedwhen the user performs photographing with the other hand. Therefore,after the position of the photographing device is placed according tothe first indication information, the placement angle of thephotographing device further needs to be placed based on the secondindication information. A specific execution process includes thefollowing:

It is determined, according to a first measurement criterion, thatplacement angles of the photographing device are the same when thephotographing device photographs at least two images. The firstmeasurement criterion may be shown in FIG. 3: When a circle in an iconis not in a center of a cross (as shown in FIG. 3 (a)), it indicatesthat the placement angle of the photographing device needs to beslightly adjusted. When the circle in the icon is in the center of thecross (as shown in FIG. 3 (b)), it indicates that the adjustment to theplacement angle of the photographing device is completed, andphotographing can be performed.

For example, when the photographing device is a mobile phone, an anglebetween a placement position of the mobile phone and a horizontal may bedetermined based on a gravitational acceleration by using anacceleration sensor of the mobile phone. If the acceleration sensor is atri-axis acceleration sensor, a 1 g gravitational acceleration isdetected in a still state. Then the acceleration is allocated to threeaxes x, y, and z to obtain different values, and relative angles betweenthe three axes and the horizontal can be learned through calculation. Aspecific principle is as follows: The tri-axis acceleration sensordetermines a posture of an object in space by using gravity as an inputvector. The acceleration sensor is fastened on a horizontal plane of theobject. When the posture of the object changes, a sensitive axis of theacceleration sensor rotates at a specific angle accordingly. Due to thegravity, an acceleration of the sensitive axis of the sensor changes.Therefore, a change of the posture of the object can be reflected bymeasuring a change of the acceleration. When the mobile phone rotates ina horizontal direction, values obtained by the acceleration sensor ofthe mobile phone are the same. In this case, a function of theacceleration sensor is not quite obvious. Therefore, a gyroscope isrequired to determine a rotation angle of the mobile phone in thehorizontal direction. The acceleration sensor and the gyroscope arejointly used to finally determine a placement angle of the mobile phone.When the placement angle of the mobile phone during photographing ispreset in the mobile phone, the display mode mentioned above is usedDuring photographing, provided that the circle in the icon is in thecenter of the cross, it indicates that the placement angle of the mobilephone is determined, and photographing can be performed.

After the photographing device is adjusted by using the foregoing methodand photographing is performed at least twice, at least two selfies canbe obtained.

Step 120: Remove arm part images that are separately included in atleast two images and that are photographed by a user by using thephotographing device, to obtain at least two remaining images.

Specifically, the present invention is intended to achieve anon-selfie-taking effect by stitching selfies. Therefore, before imagestitching, the arm part images that exist in the two selfies when theuser performs selfie-taking need to be separately removed, and the atleast two remaining images are obtained.

Step 130: Stitch the at least two remaining images.

Specifically, a process of stitching the at least two remaining imagesobtained after the arm part images that are photographed by using thephotographing device are removed may include: extracting feature pointsfrom the at least two remaining images, and matching these featurepoints. In a narrow sense, the image feature points may include an anglepoint, a crosspoint, and the like. The extracted feature points areregistered. Finally, the at least two images are fused. In this way, thenon-selfie-taking effect can be achieved. During image stitching, anamount of image stitching computation can be greatly reduced, and animage stitching effect can be quite good. In the prior art, an imagestitching algorithm (including feature point extraction, imageregistration, image fusion, and the like) is quite mature, and detailsare not described herein.

According to the method for achieving a non-selfie-taking effect throughselfie-taking provided in Embodiment 1 of the present invention, theuser can separately take at least two selfies by using two hands. Duringphotographing, the placement position and the placement angle of thephotographing device are first determined according to the indicationinformation. Then selfie-taking is separately performed by using the twohands to obtain at least two images, and image stitching is performed.During image stitching, images in which the hand holds the camera arefirst deleted, and then remaining images are stitched. In addition,placement positions and placement angles of the camera are basically thesame whenever photographing is performed. Therefore, during obtaining ofregistration control points, corresponding coordinate positions of theregistration control points are basically the same. In this way, anamount of image stitching computation is reduced, image stitching iseasier to implement, and an image stitching effect is better.

In addition, corresponding to the method for achieving anon-selfie-taking effect through selfie-taking provided in Embodiment 1of the present invention, a photographing device is provided inEmbodiment 2 of the present invention. Specifically, as shown in FIG. 4,FIG. 4 is a schematic structural diagram 400 of the photographingdevice. The photographing device includes a display module 401, aphotographing module 402, and a processing module 403.

The display module 401 is configured to display indication information.The indication information is used to indicate a placement position anda placement angle of the photographing device.

Optionally, the indication information may include first indicationinformation and second indication information. The first indicationinformation indicates the placement position of the photographingdevice. The first indication information may be a line segment or agraphic. The second indication information is used to indicate theplacement angle of the photographing device. A manner in which thesecond indication information indicates the placement angle of thephotographing device may include: determining, according to a firstmeasurement criterion, that placement angles of the photographing deviceare the same when the photographing device photographs at least twoimages. Herein the first measurement criterion may be shown in FIG. 3:When a circle in an icon is not in a center of a cross (as shown in FIG.3 (a)), it indicates that the placement angle of the photographingdevice needs to be slightly adjusted. When the circle in the icon is inthe center of the cross (as shown in FIG. 3 (b)), it indicates that theadjustment to the placement angle of the photographing device iscompleted, and photographing can be performed.

The placement position of the photographing device may include one or acombination of the following: a position aligned with a face of aphotographed person, a position aligned with a middle of a forehead ofthe photographed person, a position aligned with a nose of thephotographed person, and the like.

After the specific placement position and the specific placement angleof the photographing device are determined, the photographing module 402is configured to perform photographing according to the indicationinformation to obtain at least two images.

The processing module 403 is configured to: remove arm part images thatare separately included in the at least two images and that arephotographed by the photographing module, to obtain at least tworemaining images; and stitch the at least two remaining images.

Functions that can be implemented by the function modules of thephotographing device in Embodiment 2 of this application may beimplemented by performing the steps in the foregoing method embodiment,Therefore, a specific working process of the photographing deviceprovided in this application is not described herein again.

According to the photographing device provided in Embodiment 2 of thepresent invention, the placement position and the placement angle of thephotographing device are first determined according to the indicationinformation. Then the photographing module performs photographing toobtain the at least two images. The processing module performs imagestitching. During image stitching, images in which a hand holds a cameraare first deleted, and then remaining images are stitched. In addition,placement positions and placement angles of the camera are basically thesame whenever photographing is performed. Therefore, during obtaining ofregistration control points, corresponding coordinate positions of theregistration control points are basically the same. In this way, anamount of image stitching computation is reduced, image stitching iseasier to implement, and an image stitching effect is better.

Embodiment 3 of the present invention provides a photographing device500. Specifically, as shown in FIG. 5, the photographing device includesa display 501, a camera module 502, and a processor 503.

The display 501 is configured to display indication information on thephotographing device. The indication information is used to indicate aplacement position and a placement angle of the photographing device.

Specifically, the indication information may include first indicationinformation and second indication information. The first indicationinformation indicates the placement position of the photographingdevice. The first indication information may be a line segment or agraphic.

The second indication information is used to indicate the placementangle of the photographing device.

A manner in which the second indication information indicates theplacement angle of the photographing device may include: determining,according to a first measurement criterion, that placement angles of thephotographing device are the same when the photographing devicephotographs at least two images. Herein the first measurement criterionmay be shown in FIG. 3: When a circle in an icon is not in a center of across (as shown in FIG. 3 (a)), it indicates that the placement angle ofthe photographing device needs to be slightly adjusted. When the circlein the icon is in the center of the cross (as shown in FIG. 3 (b)), itindicates that the adjustment to the placement angle of thephotographing device is completed, and photographing can be performed.

The placement position of the photographing device may include one or acombination of the following: a position aligned with a face of aphotographed person, a position aligned with a middle of a forehead ofthe photographed person, a position aligned with a nose of thephotographed person, and the like.

After the specific placement position and the specific placement angleof the photographing device are determined, the camera module 502 isconfigured to perform photographing according to the indicationinformation to obtain at least two images.

The processor 503 is configured to: remove arm part images that areseparately included in the at least two images and that are photographedby the camera module 502, to obtain at least two remaining images; andstitch the at least two remaining images. The processor 503 may be acentral processing unit (English: central processing unit, CPU forshort).

In addition, the photographing device further includes a memory 504. Thememory 504 may include a volatile memory (English: volatile memory), forexample, a random access memory (English: random-access memory, RAM forshort). The memory may further include a non-volatile memory (English:non-volatile memory), for example, a read-only memory (English:read-only memory, ROM for short), flash memory, a hard disk (English:hard disk drive, HDD for short), or a solid state drive (English: solidstate drive, SSD for short). The memory 504 may further include acombination of the foregoing types of memories.

The memory 504 is mainly configured to store one or more programs. Theone or more programs are used to perform functional steps that can beimplemented by the processor. In addition, the memory is furtherconfigured to store the at least two images photographed by a user byusing the photographing device and an image obtained after the processor503 performs image stitching. Optionally, the processor 503 may furtherremove the arm part images that are separately included in the at leasttwo images and that are photographed by the camera module, to obtain theat least two remaining images.

Functions that can be implemented by the components of the photographingdevice in Embodiment 3 of this application may be implemented byperforming the steps in the method for achieving a non-selfie-takingeffect through selfie-taking in Embodiment 1. Therefore, a specificworking process of the photographing device provided in this applicationis not described herein again. According to the photographing deviceprovided in Embodiment 3 of the present invention, the placementposition and the placement angle of the photographing device are firstdetermined according to the indication information. Then the cameramodule performs photographing to obtain the at least two images. Theprocessor performs image stitching. During image stitching, images inwhich a hand holds a camera are first deleted, and then remaining imagesare stitched. In addition, placement positions and placement angles ofthe camera are basically the same whenever photographing is performed.Therefore, during obtaining of registration control points,corresponding coordinate positions of the registration control pointsare basically the same. In this way, an amount of image stitchingcomputation is reduced, image stitching is easier to implement, and animage stitching effect is better.

A person skilled in the art may be further aware that, in combinationwith the examples described in the embodiments disclosed in thisspecification, units and algorithm steps may be implemented byelectronic hardware, computer software, or a combination thereof. Toclearly describe the interchangeability between the hardware and thesoftware, the foregoing has generally described compositions and stepsof each example based on functions. Whether the functions are performedby hardware or software depends on particular applications and designconstraint conditions of the technical solutions. A person skilled inthe art may use different methods to implement the described functionsfor each particular application, but it should not be considered thatthe implementation goes beyond the scope of the present invention.

Steps of methods or algorithms described in the embodiments disclosed inthis specification may be implemented by hardware, a software moduleexecuted by a processor, or a combination thereof. The software modulemay reside in a random access memory (RAM), a memory, a read-only memory(ROM), an electrically programmable ROM, an electrically erasableprogrammable ROM, a register, a hard disk, a removable disk, a CD-ROM,or any other form of storage medium known in the art.

In the foregoing specific implementations, the objective, technicalsolutions, and benefits of the present invention are further describedin detail. It should be understood that the foregoing descriptions aremerely specific implementations of the present invention, but are notintended to limit the protection scope of the present invention. Anymodification, equivalent replacement, or improvement made withoutdeparting from the spirit and principle of the present invention shouldfall within the protection scope of the present invention.

What is claimed is:
 1. A method for achieving a non-selfie-taking effectthrough selfie-taking, wherein the method is performed by aphotographing device, and wherein the method comprises: displaying, onthe photographing device, first indication information that indicates afirst placement position of the photographing device; displaying, on thephotographing device, second indication information that identifies afirst current placement angle of the photographing device; performingphotographing according to the first indication information and thesecond indication information to obtain a first image; displaying, onthe photographing device, third indication information that indicates asecond placement position of the photographing device; displaying, onthe photographing device, fourth indication information that identifiesa second current placement angle of the photographing device;determining whether the first current placement angle is the same as thesecond current placement angle; performing photographing according tothe third indication information and the fourth indication informationto obtain a second image responsive to the first current placement anglebeing the same as the second current placement angle; removing parts ofthe first image and the second image that include at least a portion ofone or more hands or arms of a user to obtain at least two remainingimages; and stitching the at least two remaining images.
 2. The methodof claim 1, wherein the first placement position of the photographingdevice comprises one or more of a position aligned with a face of aphotographed person, a position aligned with a middle of a forehead ofthe photographed person, or a position aligned with a nose of thephotographed person.
 3. The method of claim 2, wherein the firstindication information is a line segment or a graphic.
 4. The method ofclaim 3, further comprising determining that the first placementposition of the photographing device is achieved when the firstindication information is aligned with a specified position of thephotographed person.
 5. The method of claim 2, further comprisingdetermining that the first placement position of the photographingdevice is achieved when the first indication information is aligned witha specified position of the photographed person.
 6. The method of claim2, further comprising determining, according to a first measurementcriterion, that the first current placement angle and the second currentplacement angle are the same, wherein the first measurement criterioncorresponds to whether a circle in an icon is in a center of a cross. 7.The method of claim 1, wherein the first placement position of thephotographing device comprises a position aligned with a face of aphotographed person.
 8. The method of claim 1, wherein the firstplacement position of the photographing device comprises a positionaligned with a middle of a forehead of a photographed person.
 9. Aphotographing device, comprising: a display configured to: display firstindication information that indicates a first placement position of thephotographing device; display second indication information thatidentifies a first current placement angle of the photographing device;display third indication information that indicates a second placementposition of the photographing device; and display fourth indicationinformation that identifies a second current placement angle of thephotographing device; a camera configured to perform photographingaccording to the first indication information and the second indicationinformation to obtain a first image; and a processor coupled to thedisplay and the camera and configured to determine whether the firstcurrent placement angle is the same as the second current placementangle, wherein the camera is further configured to perform photographingaccording to the third indication information and the fourth indicationinformation responsive to the first current placement angle being thesame as the second current placement angle to obtain a second image, andwherein the processor is further configured to: remove parts of thefirst image and the second image that include at least a portion of oneor more hands or arms of a user to obtain at least two remaining images;and stitch the at least two remaining images.
 10. The photographingdevice of claim 9, wherein the first placement position of thephotographing device comprises one or more of a position aligned with aface of a photographed person, a position aligned with a middle of aforehead of the photographed person, or a position aligned with a noseof the photographed person.
 11. The photographing device of claim 10,wherein the first indication information is a line segment or a graphic.12. The photographing device of claim 11, further comprising determiningthat the first placement position of the photographing device isachieved when the first indication information is aligned with aspecified position of the photographed person.
 13. The photographingdevice of claim 10, wherein the processor is further configured todetermine that the first placement position of the photographing deviceis achieved when the first indication information is aligned with aspecified position of the photographed person.
 14. The photographingdevice of claim 10, wherein the processor is further configured todetermine, according to a first measurement criterion, that the firstcurrent placement angle and the second current placement angle are thesame, and wherein the first measurement criterion corresponds to whethera circle in an icon is in a center of a cross.
 15. A non-transitorycomputer-readable storage medium storing at least one instruction that,when executed by a photographing device, causes the photographing deviceto: display, on the photographing device, first indication informationthat indicates a first placement position of the photographing device;display, on the photographing device, second indication information thatindicates a first placement angle of the photographing device; performphotographing according to the first indication information and thesecond indication information to obtain a first image; display, on thephotographing device, third indication information that indicates asecond placement position of the photographing device; display, on thephotographing device, fourth indication information that identifies asecond current placement angle of the photographing device; determinewhether the first placement angle is the same as the second placementangle; perform photographing according to the third indicationinformation and the fourth indication information to obtain a secondimage responsive to the first placement angle being the same as thesecond placement angle; remove parts of the first image and the secondimage that include at least a portion of one or more hands or arms of auser to obtain at least two remaining images; and stitch the at leasttwo remaining images.
 16. The non-transitory computer-readable storagemedium of claim 15, wherein the first placement position of thephotographing device comprises one or more of a position aligned with aface of a photographed person, a position aligned with a middle of aforehead of the photographed person, or a position aligned with a noseof the photographed person.
 17. The non-transitory computer-readablestorage medium of claim 16, wherein the first indication information isa line segment or a graphic.
 18. The non-transitory computer-readablestorage medium of claim 16, wherein the at least one instruction furthercauses the photographing device to determine that the first placementposition of the photographing device is achieved when the firstindication information is aligned with a specified position of thephotographed person.
 19. The non-transitory computer-readable storagemedium of claim 16, wherein the at least one instruction further causesthe photographing device to determine that the second placement positionof the photographing device is achieved when the third indicationinformation is aligned with a specified position of the photographedperson.
 20. The non-transitory computer-readable storage medium of claim16, wherein the at least one instruction further causes thephotographing device to determine, according to a first measurementcriterion, that the first current placement angle and the second currentplacement angle are the same, wherein the first measurement criterioncorresponds to whether a circle in an icon is in a center of a cross.